Linux: Learn the Ultimate Strategies to Master Operating System and Command Line. Improve Your Computer Programming Skills and Start Coding by Phillips Dan
Author:Phillips, Dan [Phillips, Dan]
Language: eng
Format: azw3, epub, pdf
Published: 2020-09-04T16:00:00+00:00
CHAPTER 7. Command Syntax Patterns
Let's discuss some common usage patterns shared by many Linux commands. Having a good feel for these basics can make learning your way around much faster. Invoking a command always starts with the command name. In some cases, as with the “ls” command, just the name on its own is enough to return a result. Still, you'll generally need to add some combination of arguments and parameters to get the most of a tool. You've already learned about how adding “-a” to the “ls” command will display all the files in a directory, even hidden files. But you can get the same results using two dashes and the word “all”. Providing these alternatives make command arguments more accessible for all kinds of people, those who remember things better through more complete descriptions and those who perform a task often enough that they can enjoy the speed of a single-letter argument. Looking at the “man” file for “ls” will show you that many other short arguments also have two-dash longer equivalents. There are exceptions to that argument syntax usage. The networking administration “ip command” can use the “addr” argument without a dash to show the IP addresses associated with your system's network interfaces. On most Linux systems this can even be shortened to a simple “a”, also without a dash. You can combine multiple short arguments in a single command. “ls-l” will list the contents of a directory in long-form, displaying object permissions, ownership, size, and age details. Running that again with the “h” command will give you the file system in a human-readable format. And adding “t” will organize the objects in descending chronological order. Besides arguments, most commands can also read properly formatted parameters. This example will list the full contents of the “etc” directory from wherever you happen to be in the filesystem. As all the best system administrators are extremely lazy, you can expect that there are going to be some pretty serious command line shortcuts hiding in plain sight. The most powerful of them is probably called autocomplete. Bash watches what you're typing and can often anticipate what it is you're after. For example to see the compressed tar archive file in a directory you can start typing the “tar” command for extracting the contents. Then you can stop at the letter “n”. Rather than having to enter the entire filename, you can just hit the Tab key, and Bash will do the rest for you. Bash understands the context of the command, so it gives you the archive, but not the subdirectory that's using a similar name. If you were to run the change directory command, “cd” with the letter “n” however, hitting Tab would correctly give you the directory name. Unsurprisingly, autocomplete will only work when there's only one matching possibility in the directory. You might sometimes need to provide a few more characters to get a good match. Speaking of “cd” and shortcuts, you can type simply “cd” from anywhere in a filesystem, and you'll be taken right back to your users home directory.
Download
Linux: Learn the Ultimate Strategies to Master Operating System and Command Line. Improve Your Computer Programming Skills and Start Coding by Phillips Dan.epub
Linux: Learn the Ultimate Strategies to Master Operating System and Command Line. Improve Your Computer Programming Skills and Start Coding by Phillips Dan.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7744)
Filmora Efficient Editing by Alexander Zacharias(5458)
The Infinite Retina by Robert Scoble Irena Cronin(4905)
Linux Device Driver Development Cookbook by Rodolfo Giometti(3908)
Learn Wireshark - Fundamentals of Wireshark. by Lisa Bock(3798)
Edit Like a Pro with iMovie by Regit(3248)
Linux Administration Best Practices by Scott Alan Miller(2846)
Linux Command Line and Shell Scripting Techniques by Vedran Dakic & Jasmin Redzepagic(2823)
MCSA Windows Server 2016 Study Guide: Exam 70-740 by William Panek(2511)
Docker on Windows by Stoneman Elton(2310)
Kali Linux - An Ethical Hacker's Cookbook: End-to-end penetration testing solutions by Sharma Himanshu(2299)
Mastering PowerShell Scripting - Fourth Edition by Chris Dent(2224)
Hands-On AWS Penetration Testing with Kali Linux by Karl Gilbert(2098)
Creative Projects for Rust Programmers by Carlo Milanesi(2054)
Hands-On Linux for Architects by Denis Salamanca(2033)
Computers For Seniors For Dummies by Nancy C. Muir(1987)
Programming in C (4th Edition) (Developer's Library) by Stephen G. Kochan(1977)
The Old New Thing by Raymond Chen(1931)
Linux Kernel Debugging by Kaiwan N Billimoria(1756)
